using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;

namespace CppCliWrapper
{
    public abstract class TypeGenerator
    {
        public string Generate(Type type)
        {
            StringBuilder outputText = new StringBuilder(1024);
            OnGenerate(type, outputText);
            //TODO: Write the output to the file
            return outputText.ToString();
        }

        public string GetFileNameFor(Type type)
        {
            return Path.Combine(Environment.CurrentDirectory, GetFileName(type));
        }

        protected abstract string GetFileName(Type type);
        protected abstract void OnGenerate(Type type, StringBuilder outputText);
    }
}
